package com.shanzhe.eshop.common.jdk;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @Author yinwei
 * @create 2021/11/2
 * @Version 1.0
 */
public class ReentractReadWriterLockDemo {
    public static void main(String[] args) {
        ReentrantReadWriteLock readWriteLock = new ReentrantReadWriteLock();
        readWriteLock.writeLock().lock();
        readWriteLock.writeLock().unlock();
        readWriteLock.readLock().lock();
        readWriteLock.readLock().unlock();
    }
}
